Analysis of GLDS-38 from NASA GeneLab

This R markdown file was auto-generated by the iDEP website Using iDEP 0.91, originally by Steven

Ge SX, Son EW, Yao R: iDEP: an integrated web application for differential expression and pathway analysis of RNA-Seq data. BMC Bioinformatics 2018, 19(1):534. PMID:30567491

1. Read data

First we set up the working directory to where the files are saved.

input_biclustMethod_ <- "BCCC()"

R packages used

library(RSQLite, verbose = FALSE) # for database connection
library(gplots, verbose = FALSE) # for hierarchical clustering
library(ggplot2, verbose = FALSE) # graphics
library(e1071, verbose = FALSE) # computing kurtosis
#library(DT, verbose = FALSE) # for renderDataTable
library(plotly, verbose = FALSE) # for interactive heatmap
library(reshape2, verbose = FALSE) # for melt correlation matrix in heatmap

# From Data Read Function
library(edgeR, verbose = FALSE) # count data D.E.
library(DESeq2, verbose = FALSE) # count data analysis, DEG.DESeq2

# TSNE Plot, tSNEgenePlot
library(Rtsne, verbose = FALSE)

# PGSA Pathway PGSEA Pathway, PGSEAplot
library(PGSEA, verbose = FALSE)
## Warning: Package 'KEGG.db' is deprecated and will be removed from Bioconductor
##   version 3.12
# DEG.limma
library(limma, verbose = FALSE) # Differential expression
library(statmod, verbose = FALSE)

# enrichment plot
library(dendextend) # customizing tree

# enrich.net2, moduleNetwork
library(igraph)

# Stringdb_geneList, StringDB_GO_enrichmentData, stringDB_network1
# StringDB_network_link
library(STRINGdb, verbose = FALSE)

# gagePathwayData
library(gage, verbose = FALSE) # pathway analysis

# fgseaPathwayData
library(fgsea, verbose = FALSE) # fast GSEA

# ReactomePAPathwayData
library(ReactomePA, verbose = FALSE) # pathway analysis

# KeggImage
library(pathview)

# genomePlot, genomePlotDataPre
library(PREDA, verbose = FALSE) # showing expression on genome
library(PREDAsampledata, verbose = FALSE)
library(hgu133plus2.db, verbose = FALSE)

# biclustering
library(biclust, verbose = FALSE)

library(knitr) #  install if needed. for showing tables with kable
library(kableExtra)

if (input_biclustMethod_ == "BCQU()") {
  library(QUBIC, verbose = FALSE)
} # have trouble installing on Linux
if (input_biclustMethod_ == "BCUnibic()") {
  library(runibic, verbose = FALSE)
} # Test biclustMethod dependant qubic runibic

# wgcna
library(WGCNA)
library(flashClust, verbose = FALSE)
source("iDEP_core_functions_only.R")
# Each row of this matrix represents a color scheme;
mycolors_ <- sort(rainbow(20))[c(1, 20, 10, 11, 2, 19, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9, 18)]

hmcols_ <- colorRampPalette(colors = c('#4575B4', '#91BFDB', '#E0F3F8', '#FFFFBF', '#FEE090', '#FC8D59', '#D73027'))(75)

heatColors_ <- rbind(
  greenred(75), 
  bluered(75), 
  colorpanel(75, "green", "black", "magenta"), 
  colorpanel(75, "blue", "yellow", "red"), 
  hmcols_
)

rownames(heatColors_) <- c("Green-Black-Red", "Blue-White-Red", "Green-Black-Magenta", "Blue-Yellow-Red", "Blue-white-brown")

We are using the downloaded gene expression file where gene IDs has been converted to Ensembl gene IDs. This is because the ID conversion database is too large to download. You can use your original file if your file uses Ensembl ID, or you do not want to use the pathway files available in iDEP (or it is not available).

inputFolderFiles <- list.files(params$input_folder, full.names = TRUE)

inputFile_ <- inputFolderFiles[stringr::str_detect(tolower(inputFolderFiles), "expression.csv$")]
sampleInfoFile_ <- inputFolderFiles[stringr::str_detect(tolower(inputFolderFiles), "sampleinfo.csv$")]
gldsMetadataFile_ <- inputFolderFiles[stringr::str_detect(tolower(inputFolderFiles), "metadata.csv$")]


geneInfoFile_ <- params$geneInfoFile
geneSetFile_ <- params$geneSetFile # pathway database in SQL; can be GMT format

STRING10_speciesFile_ <- "https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/STRING10_species.csv"
readMetadata.out_ <- readMetadata(inFile = gldsMetadataFile_) #gldsMetadataFile_)

kable(readMetadata.out_) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%")
Col0_FLT_Rep1 Col0_FLT_Rep2 Col0_FLT_Rep3 Col0_FLT_Rep4 Col0_FLT_Rep5 Col0_FLT_R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.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep1.R1.GC.A1.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep2.R1.GC.A4.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep3.R1.GC.B1.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep4.R1.GC.B4.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep5.R2.GC.A1.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep6.R2.GC.A4.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep7.R2.GC.B1.RNAseq.RNAseq Atha.Col.0.sl.pool.GC.Rep8.R2.GC.B4.RNAseq.RNAseq Atha.Cvi.0.sl.pool.FLT.Rep1.R1.FL.C3.RNAseq.RNAseq Atha.Cvi.0.sl.pool.FLT.Rep2.R1.FL.D2.RNAseq.RNAseq Atha.Cvi.0.sl.pool.FLT.Rep3.R1.FL.D5.RNAseq.RNAseq Atha.Cvi.0.sl.pool.FLT.Rep4.R2.FL.C3.RNAseq.RNAseq Atha.Cvi.0.sl.pool.FLT.Rep5.R2.FL.D2.RNAseq.RNAseq Atha.Cvi.0.sl.pool.FLT.Rep6.R2.FL.D5.RNAseq.RNAseq Atha.Cvi.0.sl.pool.GC.Rep1.R1.GC.C3.RNAseq.RNAseq Atha.Cvi.0.sl.pool.GC.Rep2.R1.GC.D2.RNAseq.RNAseq Atha.Cvi.0.sl.pool.GC.Rep3.R1.GC.D5.RNAseq.RNAseq Atha.Cvi.0.sl.pool.GC.Rep4.R2.GC.C3.RNAseq.RNAseq Atha.Cvi.0.sl.pool.GC.Rep5.R2.GC.D2.RNAseq.RNAseq Atha.Cvi.0.sl.pool.GC.Rep6.R2.GC.D5.RNAseq.RNAseq Atha.Ler.0.sl.pool.FLT.Rep1.R1.FL.C2.RNAseq.RNAseq Atha.Ler.0.sl.pool.FLT.Rep2.R1.FL.C5.RNAseq.RNAseq Atha.Ler.0.sl.pool.FLT.Rep3.R1.FL.D3.RNAseq.RNAseq Atha.Ler.0.sl.pool.FLT.Rep4.R2.FL.C2.RNAseq.RNAseq Atha.Ler.0.sl.pool.FLT.Rep5.R2.FL.C5.RNAseq.RNAseq Atha.Ler.0.sl.pool.FLT.Rep6.R2.FL.D3.RNAseq.RNAseq Atha.Ler.0.sl.pool.GC.Rep1.R1.GC.C2.RNAseq.RNAseq Atha.Ler.0.sl.pool.GC.Rep2.R1.GC.C5.RNAseq.RNAseq Atha.Ler.0.sl.pool.GC.Rep3.R1.GC.D3.RNAseq.RNAseq Atha.Ler.0.sl.pool.GC.Rep4.R2.GC.C2.RNAseq.RNAseq Atha.Ler.0.sl.pool.GC.Rep5.R2.GC.C5.RNAseq.RNAseq Atha.Ler.0.sl.pool.GC.Rep6.R2.GC.D3.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep1.R1.FL.C1.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep2.R1.FL.C4.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep3.R1.FL.D1.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep4.R1.FL.D4.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep5.R2.FL.C1.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep6.R2.FL.C4.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep7.R2.FL.D1.RNAseq.RNAseq Atha.Ws.2.sl.pool.FLT.Rep8.R2.FL.D4.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep1.R1.GC.C1.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep2.R1.GC.C4.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep3.R1.GC.D1.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep4.R1.GC.D4.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep5.R2.GC.C1.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep6.R2.GC.C4.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep7.R2.GC.D1.RNAseq.RNAseq Atha.Ws.2.sl.pool.GC.Rep8.R2.GC.D4.RNAseq.RNAseq
Sample.Id Atha.Col.0.sl.pool.FLT.Rep1.R1.FL.A1 Atha.Col.0.sl.pool.FLT.Rep2.R1.FL.A4 Atha.Col.0.sl.pool.FLT.Rep3.R1.FL.B1 Atha.Col.0.sl.pool.FLT.Rep4.R1.FL.B4 Atha.Col.0.sl.pool.FLT.Rep5.R2.FL.A1 Atha.Col.0.sl.pool.FLT.Rep6.R2.FL.A4 Atha.Col.0.sl.pool.FLT.Rep7.R2.FL.B1 Atha.Col.0.sl.pool.FLT.Rep8.R2.FL.B4 Atha.Col.0.sl.pool.GC.Rep1.R1.GC.A1 Atha.Col.0.sl.pool.GC.Rep2.R1.GC.A4 Atha.Col.0.sl.pool.GC.Rep3.R1.GC.B1 Atha.Col.0.sl.pool.GC.Rep4.R1.GC.B4 Atha.Col.0.sl.pool.GC.Rep5.R2.GC.A1 Atha.Col.0.sl.pool.GC.Rep6.R2.GC.A4 Atha.Col.0.sl.pool.GC.Rep7.R2.GC.B1 Atha.Col.0.sl.pool.GC.Rep8.R2.GC.B4 Atha.Cvi.0.sl.pool.FLT.Rep1.R1.FL.C3 Atha.Cvi.0.sl.pool.FLT.Rep2.R1.FL.D2 Atha.Cvi.0.sl.pool.FLT.Rep3.R1.FL.D5 Atha.Cvi.0.sl.pool.FLT.Rep4.R2.FL.C3 Atha.Cvi.0.sl.pool.FLT.Rep5.R2.FL.D2 Atha.Cvi.0.sl.pool.FLT.Rep6.R2.FL.D5 Atha.Cvi.0.sl.pool.GC.Rep1.R1.GC.C3 Atha.Cvi.0.sl.pool.GC.Rep2.R1.GC.D2 Atha.Cvi.0.sl.pool.GC.Rep3.R1.GC.D5 Atha.Cvi.0.sl.pool.GC.Rep4.R2.GC.C3 Atha.Cvi.0.sl.pool.GC.Rep5.R2.GC.D2 Atha.Cvi.0.sl.pool.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LT_Rep5_R2-FL-C5 Atha_Ler-0_sl-pool_FLT_Rep6_R2-FL-D3 Atha_Ler-0_sl-pool_GC_Rep1_R1-GC-C2 Atha_Ler-0_sl-pool_GC_Rep2_R1-GC-C5 Atha_Ler-0_sl-pool_GC_Rep3_R1-GC-D3 Atha_Ler-0_sl-pool_GC_Rep4_R2-GC-C2 Atha_Ler-0_sl-pool_GC_Rep5_R2-GC-C5 Atha_Ler-0_sl-pool_GC_Rep6_R2-GC-D3 Atha_Ws-2_sl-pool_FLT_Rep1_R1-FL-C1 Atha_Ws-2_sl-pool_FLT_Rep2_R1-FL-C4 Atha_Ws-2_sl-pool_FLT_Rep3_R1-FL-D1 Atha_Ws-2_sl-pool_FLT_Rep4_R1-FL-D4 Atha_Ws-2_sl-pool_FLT_Rep5_R2-FL-C1 Atha_Ws-2_sl-pool_FLT_Rep6_R2-FL-C4 Atha_Ws-2_sl-pool_FLT_Rep7_R2-FL-D1 Atha_Ws-2_sl-pool_FLT_Rep8_R2-FL-D4 Atha_Ws-2_sl-pool_GC_Rep1_R1-GC-C1 Atha_Ws-2_sl-pool_GC_Rep2_R1-GC-C4 Atha_Ws-2_sl-pool_GC_Rep3_R1-GC-D1 Atha_Ws-2_sl-pool_GC_Rep4_R1-GC-D4 Atha_Ws-2_sl-pool_GC_Rep5_R2-GC-C1 Atha_Ws-2_sl-pool_GC_Rep6_R2-GC-C4 Atha_Ws-2_sl-pool_GC_Rep7_R2-GC-D1 Atha_Ws-2_sl-pool_GC_Rep8_R2-GC-D4
GLDS 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
Accession GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37 GLDS-37
Hardware BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC BRIC
Tissue Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling Etiolated seedling
Age 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 8 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days 12 days
Organism Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana
Ecotype Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Col-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Cvi-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 Ler-0 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2 WS-2
Genotype WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT WT
Variety Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Cvi-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT Ler-0 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT WS-2 WT
Radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Cosmic radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth
Gravity Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Microgravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial
Developmental 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 8 days old Seedlings 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture 12 day old cell culture
Time.series.or.Concentration.gradient Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point Single time point
Light Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark Dark
Assay..RNAseq. RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling
Temperature Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient shuttle Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS Ambient ISS
Treatment.type Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight Space flight
Treatment.intensity Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
Treament.timing Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight Full Flight x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
Preservation.Method. RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later RNA later
readData.out_ <- readData(inFile = inputFile_, 
                          input_missingValue = "geneMedian", 
                          input_dataFileFormat = 1, 
                          input_minCounts = 0.5, 
                          input_NminSamples = 1, 
                          input_countsLogStart = 4, 
                          input_CountsTransform = 1)
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
kable(head(readData.out_$data)) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%")
Col0_FLT_Rep1 Col0_FLT_Rep2 Col0_FLT_Rep3 Col0_FLT_Rep4 Col0_FLT_Rep5 Col0_FLT_Rep6 Col0_FLT_Rep7 Col0_FLT_Rep8 Col0_GC_Rep1 Col0_GC_Rep2 Col0_GC_Rep3 Col0_GC_Rep4 Col0_GC_Rep5 Col0_GC_Rep6 Col0_GC_Rep7 Col0_GC_Rep8 Cvi0_FLT_Rep1 Cvi0_FLT_Rep2 Cvi0_FLT_Rep3 Cvi0_FLT_Rep4 Cvi0_FLT_Rep5 Cvi0_FLT_Rep6 Cvi0_GC_Rep1 Cvi0_GC_Rep2 Cvi0_GC_Rep3 Cvi0_GC_Rep4 Cvi0_GC_Rep5 Cvi0_GC_Rep6 Ler0_FLT_Rep1 Ler0_FLT_Rep2 Ler0_FLT_Rep3 Ler0_FLT_Rep4 Ler0_FLT_Rep5 Ler0_FLT_Rep6 Ler0_GC_Rep1 Ler0_GC_Rep2 Ler0_GC_Rep3 Ler0_GC_Rep4 Ler0_GC_Rep5 Ler0_GC_Rep6 Ws2_FLT_Rep1 Ws2_FLT_Rep2 Ws2_FLT_Rep3 Ws2_FLT_Rep4 Ws2_FLT_Rep5 Ws2_FLT_Rep6 Ws2_FLT_Rep7 Ws2_FLT_Rep8 Ws2_GC_Rep1 Ws2_GC_Rep2 Ws2_GC_Rep3 Ws2_GC_Rep4 Ws2_GC_Rep5 Ws2_GC_Rep6 Ws2_GC_Rep7 Ws2_GC_Rep8
AT2G41310 17.02215 17.01796 17.11739 16.48040 17.91059 17.26694 19.69218 19.20036 17.56076 17.72695 17.07714 18.37849 19.95574 19.38143 18.83440 19.12361 17.73175 17.44373 17.19451 19.12470 19.43718 19.58092 17.26674 17.25639 17.64822 19.63789 18.11876 20.17007 17.05219 17.65309 16.62785 20.37468 19.15037 18.03638 17.07419 18.36805 16.57124 19.70836 19.61946 20.43292 17.96129 19.66522 18.71354 19.00023 20.36251 21.61254 21.09230 17.93576 18.56609 18.10778 18.84677 18.34000 20.34275 21.00643 18.05459 18.47575
ATCG00020 16.62437 17.17358 19.19315 17.01808 17.00478 18.04289 18.66012 18.34950 17.07015 18.45830 17.53183 17.54468 17.76015 18.99225 17.71870 18.08240 20.40519 21.10712 20.35049 20.54416 21.03219 20.10172 18.97992 17.80879 18.09481 19.14103 18.69038 18.63707 19.47328 18.93102 20.12098 19.48839 19.30928 19.93716 18.69104 17.14268 18.52542 19.24912 17.33441 18.56512 19.42824 18.91051 18.40429 18.42327 19.77389 18.61999 18.81388 18.75576 18.83601 16.97496 16.25988 18.60692 19.16008 17.90282 16.11539 17.61189
ATCG00490 16.26692 16.68090 18.18697 17.15535 16.37882 17.29286 16.89119 17.94238 16.17645 17.48932 17.34631 17.44971 17.57745 17.66614 17.15341 17.90495 19.79300 20.45193 19.76313 19.77044 19.97784 19.27952 18.62011 17.41364 17.78610 18.62409 18.23437 18.10593 19.34302 19.30219 20.03934 19.20705 19.52952 19.63502 18.59304 17.10605 18.02425 19.69438 17.36523 18.63291 19.28034 18.37439 18.11924 18.45781 19.29917 18.23765 18.44432 18.19475 18.72367 16.56960 15.78959 17.92674 18.84758 17.51991 16.18827 17.89627
ATCG00530 13.76395 14.01048 14.89293 15.23116 14.04617 13.85371 15.29187 12.60741 15.35153 13.92719 13.69533 15.25500 16.41620 13.83225 13.61397 16.25125 14.23795 14.81088 14.57108 15.10085 14.76077 13.92069 13.94028 13.73958 13.90483 13.68475 13.84517 13.85507 14.20240 14.24318 13.94380 15.47188 14.89890 14.54820 14.21203 15.39214 15.26377 14.20046 13.78132 16.23040 16.26147 17.29414 16.61576 16.69669 17.20347 19.35494 18.03140 19.94179 14.88256 16.18132 16.92704 15.15767 15.39250 15.08054 15.84510 14.21931
ATCG00740 14.73210 14.94219 14.96504 16.04677 14.54676 14.17489 15.18165 13.11581 15.64299 13.96589 13.91204 15.53611 17.04230 13.79330 14.20803 16.25587 15.05854 14.88059 14.75081 14.86381 14.25578 13.70575 13.68758 13.93228 14.10991 13.79351 13.79747 14.30696 14.88986 15.22620 14.16816 15.53573 14.88442 14.69631 15.62069 16.03472 16.02725 14.50385 14.76714 16.70364 16.58074 18.22371 17.31301 17.44096 17.00944 18.87289 17.40664 19.25440 15.67269 16.61073 17.15054 15.90107 15.14634 15.87748 15.79090 15.44628
ATCG00650 13.96212 13.97166 14.27354 14.49403 14.36924 13.62418 14.69982 12.46797 14.94863 12.81904 12.93448 14.71847 15.66234 12.58834 13.64333 15.52227 14.05529 13.79046 14.04351 13.94000 13.25782 12.82255 12.96584 13.25719 12.99900 13.09773 12.91592 13.77193 14.15583 14.28258 13.15073 14.61523 14.36325 13.67559 14.85099 15.08337 15.65327 13.61956 14.15712 16.15821 16.43927 17.93933 17.06040 16.89910 16.60920 18.72510 17.42999 18.99587 15.30840 16.78608 16.80205 15.32805 14.87381 15.78032 15.27499 13.68067
readSampleInfo.out_ <- readSampleInfo(inFile = sampleInfoFile_, 
                                      readData.out = readData.out_)
kable(readSampleInfo.out_) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%")
Gravity Variety
Col0_FLT_Rep1 FLT Col0
Col0_FLT_Rep2 FLT Col0
Col0_FLT_Rep3 FLT Col0
Col0_FLT_Rep4 FLT Col0
Col0_FLT_Rep5 FLT Col0
Col0_FLT_Rep6 FLT Col0
Col0_FLT_Rep7 FLT Col0
Col0_FLT_Rep8 FLT Col0
Col0_GC_Rep1 GC Col0
Col0_GC_Rep2 GC Col0
Col0_GC_Rep3 GC Col0
Col0_GC_Rep4 GC Col0
Col0_GC_Rep5 GC Col0
Col0_GC_Rep6 GC Col0
Col0_GC_Rep7 GC Col0
Col0_GC_Rep8 GC Col0
Cvi0_FLT_Rep1 FLT Cvi0
Cvi0_FLT_Rep2 FLT Cvi0
Cvi0_FLT_Rep3 FLT Cvi0
Cvi0_FLT_Rep4 FLT Cvi0
Cvi0_FLT_Rep5 FLT Cvi0
Cvi0_FLT_Rep6 FLT Cvi0
Cvi0_GC_Rep1 GC Cvi0
Cvi0_GC_Rep2 GC Cvi0
Cvi0_GC_Rep3 GC Cvi0
Cvi0_GC_Rep4 GC Cvi0
Cvi0_GC_Rep5 GC Cvi0
Cvi0_GC_Rep6 GC Cvi0
Ler0_FLT_Rep1 FLT Ler0
Ler0_FLT_Rep2 FLT Ler0
Ler0_FLT_Rep3 FLT Ler0
Ler0_FLT_Rep4 FLT Ler0
Ler0_FLT_Rep5 FLT Ler0
Ler0_FLT_Rep6 FLT Ler0
Ler0_GC_Rep1 GC Ler0
Ler0_GC_Rep2 GC Ler0
Ler0_GC_Rep3 GC Ler0
Ler0_GC_Rep4 GC Ler0
Ler0_GC_Rep5 GC Ler0
Ler0_GC_Rep6 GC Ler0
Ws2_FLT_Rep1 FLT WS2
Ws2_FLT_Rep2 FLT WS2
Ws2_FLT_Rep3 FLT WS2
Ws2_FLT_Rep4 FLT WS2
Ws2_FLT_Rep5 FLT WS2
Ws2_FLT_Rep6 FLT WS2
Ws2_FLT_Rep7 FLT WS2
Ws2_FLT_Rep8 FLT WS2
Ws2_GC_Rep1 GC WS2
Ws2_GC_Rep2 GC WS2
Ws2_GC_Rep3 GC WS2
Ws2_GC_Rep4 GC WS2
Ws2_GC_Rep5 GC WS2
Ws2_GC_Rep6 GC WS2
Ws2_GC_Rep7 GC WS2
Ws2_GC_Rep8 GC WS2
input_noIDConversion_ <- TRUE

allGeneInfo.out_ <- geneInfo(fileName = geneInfoFile_)
converted.out_ <- NULL
convertedData.out_ <- convertedData(converted.out = NULL, 
                                    readData.out = readData.out_, 
                                    input_noIDConversion = TRUE)

nGenesFilter(readData.out = readData.out_, 
             converted.out = NULL, 
             convertedData.out = convertedData.out_, 
             input_noIDConversion = TRUE)
## [1] "16156 genes in 56 samples. 16121  genes passed filter.\n Original gene IDs used."
convertedCounts.out_ <- convertedCounts(readData.out = readData.out_, converted.out = NULL) # converted counts, just for compatibility

2. Pre-process

# Read counts per library
parDefault_ <- par()
par(mar = c(12, 4, 2, 2))
# barplot of total read counts
rawCounts <- readData.out_$rawCounts
groups_ <- as.factor(detectGroups(colnames(rawCounts)))
if (nlevels(groups_) <= 1 | nlevels(groups_) > 20) {
  col1_ <- "green"
} else {
  col1_ <- rainbow(nlevels(groups_))[groups_]
}

barplot(colSums(readData.out_$rawCounts) / 1e6,
        col = col1_, las = 3, main = "Total read counts (millions)"
)

readCountsBias(readData.out = readData.out_, readSampleInfo.out = readSampleInfo.out_) # detecting bias in sequencing depth
## [1] 5.946657e-07
## [1] 0.0008267088
## [1] 0.003814545
## [1] "Warning! Sequencing depth bias detected. Total read counts are significantly different among sample groups (p= 5.95e-07 ) based on ANOVA.  Total read counts seem to be correlated with factor Gravity (p= 8.27e-04 ).    Total read counts seem to be correlated with factor Variety (p= 3.81e-03 ).  "
# Box plot
boxplot(
  x = readData.out_$data,
  las = 2, col = col1_,
  ylab = "Transformed expression levels",
  main = "Distribution of transformed data"
)

# Density plot
par(parDefault_)
## Warning in par(parDefault_): graphical parameter "cin" cannot be set
## Warning in par(parDefault_): graphical parameter "cra" cannot be set
## Warning in par(parDefault_): graphical parameter "csi" cannot be set
## Warning in par(parDefault_): graphical parameter "cxy" cannot be set
## Warning in par(parDefault_): graphical parameter "din" cannot be set
## Warning in par(parDefault_): graphical parameter "page" cannot be set
densityPlot(readData.out = readData.out_, 
            mycolors = mycolors_)

# Scatter plot of the first two samples
plot(
  x = readData.out_$data[, 1:2],
  xlab = colnames(readData.out_$data)[1], 
  ylab = colnames(readData.out_$data)[2],
  main = "Scatter plot of first two samples"
)

#### plot gene or gene family
genePlot(allGeneInfo.out = allGeneInfo.out_, 
         convertedData.out = convertedData.out_, 
         input_selectOrg = "BestMatch", 
         input_geneSearch = "HOXA")
## NULL
geneBarPlotError(convertedData.out = convertedData.out_, 
                 allGeneInfo.out = allGeneInfo.out_, 
                 input_selectOrg = 'BestMatch', 
                 input_geneSearch = "HOXA", 
                 input_useSD = "FALSE") # Use standard deviation instead of standard error in error bar?
## NULL

3. Heatmap

# hierarchical clustering tree
x <- readData.out_$data
maxGene <- apply(x, 1, max)
# remove bottom 25% lowly expressed genes, which inflate the PPC
x <- x[which(maxGene > quantile(maxGene)[1]), ]
plot(as.dendrogram(hclust2(dist2(t(x)))), ylab = "1 - Pearson C.C.", type = "rectangle")

# Correlation matrix
#input_labelPCC_ <- TRUE # Show correlation coefficient?
correlationMatrix(readData.out = readData.out_, input_labelPCC = TRUE)

png(paste(params$input_folder, "heatmap.png", sep = "/"), width = 10, height = 15, units = "in", res = 300)
staticHeatmap(readData.out = readData.out_, 
              readSampleInfo.out = readSampleInfo.out_, 
              heatColors = heatColors_, 
              input_nGenes = 1000, 
              input_geneCentering = TRUE, 
              input_sampleCentering = FALSE, 
              input_geneNormalize = FALSE, 
              input_sampleNormalize = FALSE, 
              input_noSampleClustering = FALSE, 
              input_heatmapCutoff = 4, 
              input_distFunctions = 1, 
              input_hclustFunctions = 1, 
              input_heatColors1 = 1, 
              input_selectFactorsHeatmap = 'Gravity')
dev.off()
## quartz_off_screen 
##                 2

[heatmap] (GLDS37/heatmap.png)

heatmapPlotly(convertedData.out = convertedData.out_, 
              heatColors = heatColors_, 
              allGeneInfo.out = allGeneInfo.out_, 
              input_geneCentering = TRUE, 
              input_sampleCentering = FALSE, 
              input_geneNormalize = FALSE, 
              input_sampleNormalize = FALSE, 
              input_heatColors1 = 1)# interactive heatmap using Plotly

4. K-means clustering

distributionSD(convertedData.out = convertedData.out_, 
               input_nGenesKNN = 2000) # Distribution of standard deviations

KmeansNclusters(convertedData.out = convertedData.out_, 
                input_nGenesKNN = 2000) # Number of clusters

Kmeans.out_ <- Kmeans(convertedData.out = convertedData.out_,
                      maxGeneClustering = 12000, 
                      input_nGenesKNN = 2000, 
                      input_nClusters = 4, 
                      input_kmeansNormalization = "geneMean", 
                      input_KmeansReRun = 0) # Running K-means

KmeansHeatmap(Kmeans.out = Kmeans.out_, 
              .mycolors = mycolors_, 
              .heatColors = heatColors_, 
              .input_heatColors1 = 1) # Heatmap for k-Means

# Read gene sets for enrichment analysis
GeneSets.out_ <- readGeneSets(
  fileName = geneSetFile_,
  convertedData = convertedData.out_, 
  GO = "GOBP", 
  selectOrg = "NEW",
  myrange = c(15, 2000)
)

# Alternatively, users can use their own GMT files by
# GeneSets.out_ <- readGMTRobust('somefile.GMT')
results <- KmeansGO(Kmeans.out = Kmeans.out_, 
                    input_nClusters = 4, 
                    GeneSets.out = GeneSets.out_) # Enrichment analysis for k-Means clusters

results$adj.Pval <- format(results$adj.Pval, digits = 3)

kable(results, row.names = FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%")
Cluster adj.Pval Genes Pathways
A 4.45e-62 193 Response to abiotic stimulus
1.19e-52 173 Response to organic substance
1.08e-48 115 Response to inorganic substance
2.10e-45 147 Response to hormone
2.75e-45 148 Response to endogenous stimulus
9.13e-45 81 Response to metal ion
4.28e-42 69 Response to cadmium ion
2.75e-40 143 Organonitrogen compound biosynthetic process
7.20e-40 97 Amide biosynthetic process
6.27e-38 102 Cellular amide metabolic process
B 2.02e-108 78 Photosynthesis
2.29e-58 43 Photosynthesis, light reaction
5.69e-48 53 Generation of precursor metabolites and energy
2.33e-32 22 Photosynthetic electron transport chain
2.36e-31 73 Response to abiotic stimulus
4.18e-29 60 Oxidation-reduction process
7.24e-28 29 Electron transport chain
3.95e-27 62 Organonitrogen compound biosynthetic process
3.70e-26 18 Protein-chromophore linkage
4.39e-24 40 Response to light stimulus
C 4.50e-35 91 Response to oxygen-containing compound
2.70e-31 99 Response to abiotic stimulus
1.74e-28 80 Cellular response to chemical stimulus
1.64e-27 70 Response to acid chemical
3.24e-26 88 Response to organic substance
1.33e-23 58 Response to inorganic substance
5.08e-22 37 Response to water
5.08e-22 30 Cellular response to decreased oxygen levels
5.08e-22 30 Cellular response to oxygen levels
5.08e-22 30 Cellular response to hypoxia
D 5.13e-27 114 Response to abiotic stimulus
4.74e-19 86 Response to hormone
4.90e-19 63 Response to inorganic substance
5.55e-19 95 Response to organic substance
5.77e-19 86 Response to endogenous stimulus
7.87e-18 79 Cellular response to chemical stimulus
1.20e-17 81 Response to oxygen-containing compound
6.77e-15 64 Response to acid chemical
8.33e-15 46 Response to osmotic stress
1.30e-14 56 Cellular amide metabolic process
tSNEgenePlot(Kmeans.out_, 
             input_seedTSNE = 0, 
             input_colorGenes = TRUE, # Color genes in t-SNE plot?
             mycolors = mycolors_) # Plot genes using t-SNE

5. PCA and beyond

PCAplot(convertedData.out = convertedData.out_, 
        readSampleInfo.out = readSampleInfo.out_, 
        input_selectFactors = colnames(readSampleInfo.out_)[1], 
        input_selectFactors2 = colnames(readSampleInfo.out_)[2])

MDSplot(convertedData.out = convertedData.out_, 
        readSampleInfo.out = readSampleInfo.out_, 
        input_selectFactors = colnames(readSampleInfo.out_)[1], 
        input_selectFactors2 = colnames(readSampleInfo.out_)[2])

tSNEplot(convertedData.out = convertedData.out_, 
         readSampleInfo.out = readSampleInfo.out_, 
         input_selectFactors = colnames(readSampleInfo.out_)[1],
         input_selectFactors2 = colnames(readSampleInfo.out_)[2],
         input_tsneSeed2 = 0)

# Read gene sets for pathway analysis using PGSEA on principal components
GeneSets.out_ <- readGeneSets(
  fileName = geneSetFile_,
  convertedData = convertedData.out_, 
  GO = "GOBP", 
  selectOrg = "NEW",
  myrange = c(15, 2000)
)

PCApathway(convertedData.out = convertedData.out_, 
           GeneSets.out = GeneSets.out_) # Run PGSEA analysis

cat(
  PCA2factor(readData.out = readData.out_, 
             readSampleInfo.out = readSampleInfo.out_)
) # The correlation between PCs with factors
## 
##  Correlation between Principal Components (PCs) with factors
## PC1 is correlated with Variety (p=7.62e-14).
## PC2 is correlated with Variety (p=9.29e-14).
## PC3 is correlated with Gravity (p=2.56e-05).

6. DEG1

# List to hold limma outputs for all variables
limma_outputs <- setNames(as.list(rep(NA, ncol(readSampleInfo.out_))),
                          nm = colnames(readSampleInfo.out_))

# List to hold all comparisons for each variable
comps <- limma_outputs 

# List to hold all DEG.out for each variable
DEG_output <- limma_outputs 

for (variable in colnames(readSampleInfo.out_)){
  values <- unique(readSampleInfo.out_[, variable])
  
  # Create all combinations for this variable  
  all_comps <- outer(values, values, function(x,y) paste0(variable, ": ", x, " vs. ", y))
  comps[[variable]] <- all_comps[upper.tri(all_comps)]
}

# Run limma for all variables. lapply runs the function for each element of the list that you provide.
limma_outputs <- lapply(comps, 
                        function(x) 
                          limma(convertedData.out = convertedData.out_, 
                                readSampleInfo.out = readSampleInfo.out_, 
                                input_dataFileFormat = 1, 
                                input_countsLogStart = 4, 
                                convertedCounts.out = convertedCounts.out_, 
                                input_CountsDEGMethod = 3, # 3 
                                input_limmaPval = 0.1, 
                                input_limmaFC = 3, 
                                input_selectModelComprions = x, 
                                input_selectFactorsModel = unlist(strsplit(x[1], split = ":"))[1],
                                input_selectInteractions = NULL, 
                                input_selectBlockFactorsModel = NULL, 
                                factorReferenceLevels.out = NULL)
)
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors

## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors

## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors

## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
DEG.data_out <- lapply(limma_outputs,
                       function(x) 
                         DEG.data(limma.out = x,
                                  convertedData.out = convertedData.out_, 
                                  allGeneInfo.out = allGeneInfo.out_))
for (var in names(limma_outputs)){
  # Print header for subsection
  cat("### Limma for", var) 
  cat("\n\n")
  
  # Print all comparisons done.
  cat("Comparisons done for this variable:\n") 
  cat(limma_outputs[[var]]$comparisons, sep = ", ")
  cat("\n")
  
  ## Venn diagram.
  nVennGroups <- min(params$nVennGroupsMax, length(limma_outputs[[var]]$comparisons)) # if less than three comparisons, include all comparisons.
  vennPlot(limma.out = limma_outputs[[var]], 
           input_selectComparisonsVenn = limma_outputs[[var]]$comparisons[1:nVennGroups], 
           input_UpDownRegulated = FALSE) # Split up and down regulated genes
  
  print(sigGeneStats(limma_outputs[[var]])) # number of DEGs as figure
  
  kable(sigGeneStatsTable(limma_outputs[[var]]), 
        row.names = FALSE) %>% # number of DEGs as table
    kable_styling(bootstrap_options = c("striped", "hover"), position = "center") %>% 
    print()
}

Limma for Gravity

Comparisons done for this variable: FLT-GC
Comparisons Up Down
FLT-GC 46 38

Limma for Variety

Comparisons done for this variable: Col0-Cvi0, Col0-Ler0, Cvi0-Ler0, Col0-WS2, Cvi0-WS2, Ler0-WS2
Comparisons Up Down
Col0-Cvi0 315 353
Col0-Ler0 287 292
Cvi0-Ler0 72 94
Col0-WS2 290 296
Cvi0-WS2 289 287
Ler0-WS2 267 264